<?php

namespace frontend\modules\activity\controllers;

use Yii;
use frontend\components\Controller;
use frontend\modules\activity\models\ActivityProductSearch;

/**
 * 首页相关接口
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class DefaultController extends Controller {

    public $modelClass = 'apiend\modules\shop\models\ShopHomeLogic';

    /**
     * @inheritdoc
     */
    protected function verbs() {
        return [
            '*' => ['GET'],
        ];
    }

    /**
     * 首页默认接口
     * @inheritdoc
     */
    public function actionIndex() {
        return [];
    }

    /**
     * 商品活动接口
     * @inheritdoc
     */
    public function actionView($id) {
        $model = new ActivityProductSearch();
        $model->activity_id = $id;
        return $model->search();
    }

}
